|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectj3deditor.bin.editor.util.VertexManipulator
public class VertexManipulator
Utility for converting coordinates between 3D scene
and Scene2D.
| Constructor Summary | |
|---|---|
VertexManipulator()
|
|
| Method Summary | |
|---|---|
static boolean |
addVertex(J3DePoint2D location,
Scene2D scene)
Adds a new vertex to the specified polygonal mesh if possible. |
static int |
getEdgeEndIndex(int vertexIndex,
Scene2D scene)
Returns the index of the second vertex of the edge with the specified first vertex. |
static int |
getStateType(Scene2D scene)
Returns the manipulation target of the specified scene: Vertex.TEXTURE_VERTEX_STATE
or Vertex.COORDINATE_VERTEX_STATE. |
static J3DePoint2D |
getVertexPosition2D(Vertex v,
Scene2D scene)
Returns the position of a vertex in the coordinate system of the specified Scene2D. |
static boolean |
isInBounds(J3DePoint2D pos,
J3DePoint2D p1,
J3DePoint2D p2)
Returns true if the specified point is located inside the specified rectangle. |
static void |
rotateVertices(float rotation,
Scene2D scene)
Rotates the selected part of a polygonal mesh. |
static void |
scaleVertices(float scaleChange,
Scene2D scene)
Resizes the selected part of a polygonal mesh. |
static void |
selectVertex(J3DePoint2D p,
Scene2D scene,
boolean isShiftDown)
Selects a vertex which is close enough to cursor. |
static void |
selectVertices(J3DePoint2D p1,
J3DePoint2D p2,
Scene2D scene)
Selects all vertices which are located inside the specified rectangle. |
static void |
translateVertices(float x,
float y,
Scene2D scene)
Translates the selected vertices. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VertexManipulator()
| Method Detail |
|---|
public static int getStateType(Scene2D scene)
Vertex.TEXTURE_VERTEX_STATE
or Vertex.COORDINATE_VERTEX_STATE.
scene - Scene2D which manipulation target will be returned
Vertex.TEXTURE_VERTEX_STATE or
Vertex.COORDINATE_VERTEX_STATE
public static void selectVertex(J3DePoint2D p,
Scene2D scene,
boolean isShiftDown)
p - the position of cursorscene - Scene2D the selection was made inisShiftDown - is user holding shift key or not.
public static void selectVertices(J3DePoint2D p1,
J3DePoint2D p2,
Scene2D scene)
p1 - top left corner of the rectanglep2 - bottom right corner of the rectanglescene - Scene2D the selection was made in
public static boolean isInBounds(J3DePoint2D pos,
J3DePoint2D p1,
J3DePoint2D p2)
pos - the pointp1 - top left corner of the rectanglep2 - bottom right corner of the rectangle
public static J3DePoint2D getVertexPosition2D(Vertex v,
Scene2D scene)
Scene2D.
v - vertex which coordinates will be returnedscene - Scene2D which coordinate system
the specified vertex will be transformed
Scene2D
public static int getEdgeEndIndex(int vertexIndex,
Scene2D scene)
vertexIndex - index of the first vertex of this edgescene - Scene2D which has the reference to that
GeometryManipulator in which the vertices are
located in
public static void translateVertices(float x,
float y,
Scene2D scene)
x - change of position on Scene2D X axisy - change of position on Scene2D Y axisscene - Scene2D in which the vertices are translated
public static void scaleVertices(float scaleChange,
Scene2D scene)
scaleChange - change of scalescene - Scene2D in which the vertices are scaled
public static void rotateVertices(float rotation,
Scene2D scene)
rotation - angle of rotationscene - Scene2D in which the vertices are rotated
public static boolean addVertex(J3DePoint2D location,
Scene2D scene)
location - location of vertex in the coordinate system of the specified Scene2Dscene - Scene2D in which the vertex was added
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||